﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ErrorLog
{
    public class AsynchLog
    {
        delegate void MethodDelegate(string strError);

        public static void LogNow(string strError)
        {
            ILog log = new ErrorLog().ErrorLogFactory();

            MethodDelegate callGenerateFileAsync = new MethodDelegate(log.logNow);
            //callGenerateFileAsync(strError);
            IAsyncResult ar = callGenerateFileAsync.BeginInvoke(strError,null,null);
            callGenerateFileAsync.EndInvoke(ar);
        }
    }
}
